package com.csaba.connector.fhb;

import org.apache.http.NameValuePair;

import com.csaba.connector.ServiceException;
import com.csaba.connector.fhb.model.FHBRequestFactory;
import com.csaba.connector.fhb.model.FHBSession;
import com.csaba.connector.model.Session;
import com.csaba.connector.service.AbstractBankService;
import com.csaba.connector.service.DummyService;

public class FHBDummyService extends AbstractBankService implements DummyService
{

	@Override
	public void execute( final Session session ) throws ServiceException
	{
		final FHBSession fhb = (FHBSession) session;

		//dummy
		//		time=1317581427306
		//		CSRFValidationCode=ee1f10482c89b8c6b08302930643982
		//		ajaxrequest=true
		//		:__CLIENT_TRANSFORMATION__=true
		final NameValuePair[] dummyData = fhb.getParamTemplate(0);

		final String dummyResult = fhb.doPost(
				FHBRequestFactory.getInstance().getAction(FHBRequestFactory.ACTION_DUMMY, null), dummyData);
		fhb.debugFile("dummyResult", dummyResult);
		fhb.checkGenericErrors(dummyResult);
	}
}
